/*
 * process.h
 * 
 *
 */
 
#ifndef PROCESS_H
#define PROCESS_H

typedef struct p_str {
	int priority; 
	int process_type;   // code for process type, e.g. 0=compute, 1=i0, 2=keyboard, etc.
	int	num_steps;		// number of time steps before resetting to 0 - number of instructions
	int num_requests;	// number of requests that will be generated during the process run
	int * requests;		// an array of requests, each request (e.g. io service) is issued at a specific
						// time step. These are the synchronous events that result in traps being issued.
						// You can get fancy and make this an array of RequestTypeStr which contains the
						// step number when issued, and a request type (e.g. 0=io, 1=sync, etc.)
	// member functions
	int (*update_proc)(struct p_str*, int*); // update the process
	int (*destruct)(struct p_str*);          // destruct
	} Process;

typedef Process* ProcessPtr;

ProcessPtr ProcessConstruct(int type, int steps, int requests, int* request_list);


#endif
